<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>网站后台管理模版</title>
    <link rel="stylesheet" type="text/css" href="__STATIC__/admin/layui/css/layui.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC__/admin/css/admin.css"/>

</head>
<body>
<div class="wrap-container list-wrap">
    <div class="wrap-group">
        <form class="layui-form" action="{:url('category/index')}">
            <div class="layui-form-item">
                <div class="layui-inline tool-btn">
                    <button class="layui-btn layui-btn-small layui-btn-normal addBtn"><i class="layui-icon">&#xe654;</i></button>
                    <button class="layui-btn layui-btn-small layui-btn-danger delBtn"><i class="layui-icon">&#xe640;</i></button>
                    <button class="layui-btn layui-btn-small layui-btn-warm listOrderBtn"><i class="iconfont">&#xe656;</i></button>
                </div>
                <div class="layui-inline">
                    <input type="text" name="name" value="{$Think.get.name}" placeholder="请输入标题" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-inline">
                    <select name="status" lay-filter="status">
                        <option value="" {eq name="$Think.get.status" value=""}selected{/eq}>请选择一个状态</option>
                        <option value="" {eq name="$Think.get.status" value=""}selected{/eq}>请选择一个状态</option>
                        <option value="1" {eq name="$Think.get.status" value="1"}selected{/eq}>正常</option>
                        <option value="2" {eq name="$Think.get.status" value="2"}selected{/eq}>待审</option>
                    </select>
                </div>
                <button class="layui-btn layui-btn-normal" lay-submit="search">搜索</button>
            </div>
        </form>
    </div>
    <div class="layui-form" id="category-table-list">

            <table class="layui-table" lay-even lay-skin="nob">
                <colgroup>
                    <col width="50">
                    <col class="hidden-xs" width="50">
                    <col width="100">
                    <col>
                    <col class="hidden-xs" width="200">
                    <col class="hidden-xs" width="200">
                    <col width="80">
                    <col width="230">
                </colgroup>
                <thead>
                <tr>
                    <th><input type="checkbox" name="" lay-skin="primary" lay-filter="allChoose"></th>
                    <th class="hidden-xs">ID</th>
                    <th>排序</th>
                    <th>名称</th>
                    <th class="hidden-xs">创建时间</th>
                    <th class="hidden-xs">修改时间</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody id="table-list">
                    {volist name="categorys" id="vo" empty="$empty"}
                    <tr>
                        <td><input type="checkbox" name="delete" lay-skin="primary" lay-filter="check" value="{$vo.id}" data-id="{$vo.id}"></td>
                        <td class="hidden-xs">{$vo.id}</td>
                        <td><input type="text" name="listorder"  autocomplete="off" class="layui-input" value="{$vo.listorder}" data-id="{$vo.id}"></td>
                        <td><a href="{:url('Category/index',['parent_id'=>$vo.id])}" data-id="{$vo.id}">{$vo.name}</a></td>
                        <td class="hidden-xs">{$vo.create_time}</td>
                        <td class="hidden-xs">{$vo.update_time}</td>
                        <td data-id="{$vo.id}">
                            {$vo.status|status}
                        </td>
                        <td>
                            <div class="layui-inline">
                                {eq name="$vo.parent_id" value="0"}
                                <a href="{:url('Category/index',['parent_id'=>$vo.id])}" class="layui-btn layui-btn-small layui-btn-primary hidden-xs">进入二级栏目</a>
                                {/eq}
                                <button class="layui-btn layui-btn-small layui-btn-normal edit-btn" data-id="{$vo.id}"><i class="layui-icon">&#xe642;</i></button>
                                <button class="layui-btn layui-btn-small layui-btn-danger del-btn" data-id="{$vo.id}"><i class="layui-icon">&#xe640;</i></button>
                            </div>
                         </td>
                    </tr>
                    {/volist}
                </tbody>
            </table>

            <div class="page-wrap">
                {$page}
            </div>
    </div>
</div>

<script>
   var SCOPE={
       static:'__STATIC__',
       index:'{:url("Category/index")}',
       add:'{:url("Category/add")}',
       save:'{:url("Category/save")}',
       edit:'{:url("Category/edit")}',
       updateEdit:'{:url("Category/updateEdit")}',
       status:'{:url("Category/updateStatus")}',
       del:'{:url("Category/del")}',
       delAll:'{:url("Category/deleteAll")}',
       listOrderAll:'{:url("Category/listOrderAll")}'
   }

</script>
<script src="__STATIC__/admin/layui/layui.js"></script>
<script src="__STATIC__/admin/js/category.js"></script>
<script src="__STATIC__/admin/js/common.js"></script>
</body>
</html>